package com.avecsys.quotemanager.pojos;

import java.util.HashSet;
import java.util.Set;

/**
 * @author sam sundar
 * 
 */
public class SupplierMasterPojo extends BasePojo implements
		java.io.Serializable {

	private Long supplierId;
	private String companyName;
	private String addressLine1;
	private String addressLine2;
	private String city;
	private CountryMasterPojo countryMasterPojo = new CountryMasterPojo();
	private String email;
	private String contactPerson;

	private Set<UserMasterPojo> supplierUsers = new HashSet<UserMasterPojo>();

	/**
	 * @return the supplierUsers
	 */
	public Set<UserMasterPojo> getSupplierUsers() {
		return supplierUsers;
	}

	/**
	 * @param supplierUsers
	 *            the supplierUsers to set
	 */
	public void setSupplierUsers(Set<UserMasterPojo> supplierUsers) {
		this.supplierUsers = supplierUsers;
	}

	/**
	 * @return the supplierId
	 */
	public Long getSupplierId() {
		return supplierId;
	}

	/**
	 * @param supplierId
	 *            the supplierId to set
	 */
	public void setSupplierId(Long supplierId) {
		this.supplierId = supplierId;
	}

	/**
	 * @return the companyName
	 */
	public String getCompanyName() {
		return companyName;
	}

	/**
	 * @param companyName
	 *            the companyName to set
	 */
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	/**
	 * @return the addressLine1
	 */
	public String getAddressLine1() {
		return addressLine1;
	}

	/**
	 * @param addressLine1
	 *            the addressLine1 to set
	 */
	public void setAddressLine1(String addressLine1) {
		this.addressLine1 = addressLine1;
	}

	/**
	 * @return the addressLine2
	 */
	public String getAddressLine2() {
		return addressLine2;
	}

	/**
	 * @param addressLine2
	 *            the addressLine2 to set
	 */
	public void setAddressLine2(String addressLine2) {
		this.addressLine2 = addressLine2;
	}

	/**
	 * @return the city
	 */
	public String getCity() {
		return city;
	}

	/**
	 * @param city
	 *            the city to set
	 */
	public void setCity(String city) {
		this.city = city;
	}

	/**
	 * @return the countryMasterPojo
	 */
	public CountryMasterPojo getCountryMasterPojo() {
		return countryMasterPojo;
	}

	/**
	 * @param countryMasterPojo
	 *            the countryMasterPojo to set
	 */
	public void setCountryMasterPojo(CountryMasterPojo countryMasterPojo) {
		this.countryMasterPojo = countryMasterPojo;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the contactPerson
	 */
	public String getContactPerson() {
		return contactPerson;
	}

	/**
	 * @param contactPerson
	 *            the contactPerson to set
	 */
	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public SupplierMasterPojo() {
	}

	@Override
	public boolean isPersisted() {
		if (supplierId == null || supplierId == 0) {
			return false;
		} else {
			return true;
		}
	}

}
